home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.basic;
-
- import java.beans.PropertyChangeEvent;
- import java.beans.PropertyChangeListener;
- import javax.swing.ComboBoxModel;
-
- public class BasicComboPopup$PropertyChangeHandler implements PropertyChangeListener {
- // $FF: synthetic field
- private final BasicComboPopup this$0;
-
- protected BasicComboPopup$PropertyChangeHandler(BasicComboPopup var1) {
- this.this$0 = var1;
- }
-
- public void propertyChange(PropertyChangeEvent var1) {
- String var2 = var1.getPropertyName();
- if (var2.equals("model")) {
- this.this$0.uninstallComboBoxModelListeners((ComboBoxModel)var1.getOldValue());
- this.this$0.list.setModel((ComboBoxModel)var1.getNewValue());
- this.this$0.installComboBoxModelListeners((ComboBoxModel)var1.getNewValue());
- if (this.this$0.comboBox.getItemCount() > 0) {
- this.this$0.comboBox.setSelectedIndex(0);
- }
-
- if (this.this$0.isVisible()) {
- this.this$0.hide();
- }
- } else if (var2.equals("renderer")) {
- this.this$0.list.setCellRenderer(this.this$0.comboBox.getRenderer());
- if (this.this$0.isVisible()) {
- this.this$0.hide();
- }
- } else if (var2.equals("JComboBox.lightweightKeyboardNavigation")) {
- Object var3 = var1.getNewValue();
- if (var3.equals("Lightweight")) {
- BasicComboPopup.access$1(this.this$0, true);
- } else if (var3.equals("Heavyweight")) {
- BasicComboPopup.access$1(this.this$0, false);
- }
- }
-
- }
- }
-